#ifndef __HW_BUTTON_H__
#define __HW_BUTTON_H__
#include "Service.h"
#include "WString.h"

class Button : public Service{
private:
	char pin_;
	char prevValue_;
	char lastStableState_;
	int debounceDelay_;
	long lastDebounceTime_; 
public:
	Button(IArduino& arduino, MessageRouter& router, const String& name, ILogger& logger, int pin, int debounceDelay = 50);
	virtual void tick(long milliseconds);
};

#endif